package com.alibaba.druid.sql.dialect.mysql.ast.statement;

import com.alibaba.druid.sql.ast.SQLObject;
import com.alibaba.druid.sql.ast.statement.SQLSelectGroupByClause;
import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlASTVisitor;
import com.alibaba.druid.sql.visitor.SQLASTVisitor;















public class MySqlSelectGroupBy
        extends SQLSelectGroupByClause
{
    private boolean rollUp = false;

    public boolean isRollUp() { return this.rollUp; }



    public void setRollUp(boolean rollUp) { this.rollUp = rollUp; }



    protected void accept0(SQLASTVisitor visitor) {
        if (visitor instanceof MySqlASTVisitor) {
            accept0((MySqlASTVisitor)visitor);
        } else {
            if (visitor.visit(this)) {
                acceptChild(visitor, getItems());
                acceptChild(visitor, (SQLObject)getHaving());
            }

            visitor.endVisit(this);
        }
    }

    protected void accept0(MySqlASTVisitor visitor) {
        if (visitor.visit(this)) {
            acceptChild((SQLASTVisitor)visitor, getItems());
            acceptChild((SQLASTVisitor)visitor, (SQLObject)getHaving());
        }

        visitor.endVisit(this);
    }
}
